# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/topics/items.html



from scrapy.item import Item, Field

class StoxISItem(Item):
    # define the fields for your item here like:
    # name = Field()
    ticker = Field()
    year = Field()
    quarter = Field()    
    doanh_thu_thuan = Field()
    gia_von_hang_ban = Field()
    lai_gop = Field()
    thu_nhap_tai_chinh = Field()
    chi_phi_tai_chinh = Field()
    chi_phi_tien_lai_vay = Field()
    chi_phi_ban_hang = Field()
    chi_phi_quan_ly = Field()
    lai_tu_hdkd = Field()
    lai_cty_ld_lk = Field()
    thu_nhap_khac = Field()    
    lai_truoc_thue = Field()
    thue_TNDN_ht = Field()
    thue_TNDN_hl = Field()
    lai_sau_thue = Field()
    loi_ich_CDTS = Field()
    lai_co_dong_cty_me = Field()
    chi_phi_khau_hao_TSCD = Field()
    
    
    
class StoxISBankItem(Item):
    # define the fields for your item here like:
    # name = Field()
    ticker = Field()
    year = Field()
    quarter = Field()
    thu_nhap_lai_va_khoan_tt = Field()
    chi_phi_lai = Field()
    thu_nhap_lai_thuan = Field()
    thu_nhap_hd_dich_vu = Field()
    chi_phi_hd_dich_vu = Field()
    lai_thuan_hd_dich_vu = Field()
    kd_ngoai_hoi_vang = Field()
    chung_khoan_KD = Field()
    chung_khoan_dau_tu = Field()
    hoat_dong_khac = Field()
    thu_nhap_gop_von_CP = Field()
    tong_thu_nhap_HD = Field()
    tong_chi_phi_HD = Field()
    LN_HDKD_truoc_CF_du_phong = Field()
    chi_phi_du_phong_RR = Field()
    loi_nhuan_tt = Field()
    thue_TNDN = Field()
    co_dong_thieu_so = Field()
    loi_nhuan_thuan = Field()

class StoxBSItem(Item):
    # define the fields for your item here like:
    # name = Field()
    ticker = Field()
    year = Field()
    quarter = Field()
    
    ts_ngan_han = Field() 
    tien_va_td_tien = Field()    
    gt_thuan_dau_tu_ngan_han = Field()
    khoan_phai_thu = Field()
    hang_ton_kho = Field()
    ts_luu_dong_khac = Field()
    
    TS_dai_han = Field()
    phai_thu_dai_han = Field()
    ts_co_dinh = Field()
    ts_dau_tu = Field()
    dau_tu_dai_han = Field()
    loi_the_thuong_mai = Field()
    ts_dai_han_khac = Field()
    
    tong_ts = Field()
    
    no_phai_tra = Field()
    no_ngan_han = Field()
    no_dai_han = Field()
    
    von_CSH = Field()
    von_va_cac_quy = Field()
    quy_khac = Field()
    lai_chua_phan_phoi = Field()
    von_ngan_sach_NH_quy = Field()
    
    loi_ich_CDTS = Field()
    tong_cong_nguon_von = Field()
    
    

    
class StoxBSBankItem(Item):
    # define the fields for your item here like:
    # name = Field()
    ticker = Field()
    year = Field()
    quarter = Field()
    tong_TS = Field()
    tien_mat_vang_bac_da_quy = Field()
    tien_gui_NHNN = Field()
    tien_gui_cac_tctd_khac  = Field()
    tong_ck_kinh_doanh = Field()
    ck_kinh_doanh = Field()
    du_phong_giam_gia_ck_kinh_doanh = Field()
    tc_phai_sinh_va_no_tc_khac_ckkd = Field()
    tong_cho_vay_khach_hang = Field()
    cho_vay_khach_hang = Field()
    du_phong_rr_cho_vay_KH = Field()
    ck_dau_tu = Field()
    ck_dau_tu_san_sang_de_ban = Field()
    ck_dau_tu_giu_den_dao_han = Field()
    du_phong_giam_gia_ck_dau_tu = Field()
    gop_von_dau_tu_dai_han = Field()
    dt_vao_cong_ty_con = Field()
    dt_vao_cong_ty_lien_doanh = Field()
    dt_dai_han_khac = Field()
    du_phong_giam_gia_dt_dai_han = Field()
    tai_san_co_dinh = Field()
    tai_san_co_dinh_huu_hinh = Field()
    tai_san_co_dinh_thue_tc = Field()
    tai_san_co_dinh_vo_hinh = Field()
    bat_dong_san_dau_tu = Field()
    tai_san_co_khac = Field()
    no_phai_tra_va_von_CSH = Field()
    tong_no_phai_tra = Field()
    cac_khoan_no_cp_va_NHNN = Field()
    tien_gui_vay_tctd_khac = Field()
    tien_gui_cua_KH = Field()
    tc_phai_sinh_va_no_tc_khac_no = Field()
    von_tai_tro_utdt_cp_tctd_khac = Field()
    phat_hanh_giay_to_co_gia = Field()
    khoan_no_khac = Field()
    von_CSH = Field()
    von_cua_tctd = Field()
    quy_cua_tctd = Field()
    chenh_lech_tg_hoi_doai = Field()
    chenh_lech_danh_gia_lai_TS = Field()
    loi_nhuan_chua_phan_phoi = Field()
    loi_ich_cua_CDTS = Field()


class StoxFIItem(Item):
    # define the fields for your item here like:
    # name = Field()
    ticker = Field()
    year = Field()
    quarter = Field()
    
    gia = Field()
    sl_CPLH = Field()
    von_hoa = Field()
    co_tuc = Field()
    
    eps = Field()
    pe = Field()
    bvs = Field()
    pb = Field()
    
    ts_loi_nhuan_gop = Field()
    ts_loi_nhuan_truoc_thue = Field()
    ts_loi_nhuan_rong = Field()
    ebit = Field()
    ebitda = Field()
    roe = Field()
    roa = Field()
    
    vong_quay_hang_ton_kho = Field()
    vong_quay_khoan_phai_thu = Field()
    vong_quay_khoan_phai_tra = Field()
    vong_quay_tong_tai_san = Field()
    kha_nang_tra_lai_vay = Field()
    
    no_t_tong_tai_san = Field()
    no_t_von_CSH = Field()
    vay_dai_han_t_tong_ts = Field()
    vay_dai_han_t_von_CSH = Field()
    no_ngan_han_t_tong_TS = Field()
    no_ngan_han_t_von_CSH = Field()
    
    tang_truong_doanh_thu = Field()
    tang_truong_LN_rong = Field()
    
    ts_thanh_toan_hien_hanh = Field()
    ts_thanh_toan_nhanh = Field()
    ts_thanh_toan_tien_mat = Field()



class StoxFIBankItem(Item):
    
    # define the fields for your item here like:
    # name = Field()
    ticker = Field()
    year = Field()
    quarter = Field()

    gia = Field()
    sl_CPLH = Field()
    von_hoa = Field()
    co_tuc = Field()
    
    eps = Field()
    pe = Field()
    bvs = Field()
    pb = Field()
    
    ts_loi_nhuan_rong = Field()
    ts_sinh_lai = Field()
    no_chiu_lai = Field()
    chi_phi_t_tren_TN_hoat_dong = Field()
    ts_sinh_loi_cua_TS = Field()
    chi_phi_von = Field()
    NIS = Field()
    NIM = Field()
    
    roa = Field()
    roe = Field()
    roa_tdp = Field()
    
    tang_truong_LN_rong = Field()
    tang_truong_tong_TS = Field()
    tang_truong_cho_vay = Field()
    tang_truong_huy_dong = Field()
    tang_truong_chi_phi_hoat_dong = Field()
    tang_truong_LN_truoc_du_phong = Field()
    tang_truong_TN_lai_thuan = Field()
    tang_truong_TN_ngoai_lai = Field()
    
    don_bay_tai_chinh = Field()
    cho_vay_t_huy_dong = Field()
    no_xau = Field()
    no_xau_t_cho_vay = Field()
    du_phong_t_no_xau = Field()
    chi_phi_du_phong_t_cho_vay = Field()

